import { useEffect, useMemo } from 'react';
import { Descriptions } from 'antd';
import styles from './code_01.module.less';
import Divider from '@/components/Divider';
const App = (props) => {
  /**
   * 基本信息
   */
  const data = useMemo(() => {
    return props.basicData.data?.filter(
      (ele) => (ele.children || ele.mustType) && ele.children !== 'notFilledIn',
    );
  }, [props.basicData.data]);
  const config = useMemo(
    () => props.basicData?.config || {},
    [props.basicData.config],
  );
  useEffect(() => {
    console.log(props.educationData);
  }, [props.educationData]);
  return (
    <div className={styles.code_01}>
      <header className={styles.header}>
        <div className={styles.text}>个人简历</div>
      </header>
      <section className={styles.content}>
        <Divider>
          <span className={styles.title}>{config?.title}</span>
        </Divider>
        <div className={styles.contentList}>
          <Descriptions
            size="small"
            items={data}
            column={2}
            contentStyle={{
              fontSize: '12px',
            }}
            labelStyle={{
              fontSize: '12px',
            }}
          />
        </div>
      </section>
    </div>
  );
};
export default App;
